package com.wenheng.service.impl;

import com.wenheng.annotation.TargetDataSource;
import com.wenheng.commer.DataSourceType;
import com.wenheng.entity.User;
import com.wenheng.entity.UserObms;
import com.wenheng.mapper.UserMapper;
import com.wenheng.mapper.UserObmsMapper;
import com.wenheng.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Autowired
    private UserObmsMapper userObmsMapper;


    @Override
    public User findUser(Integer id) {
        return userMapper.findUserInfo(id);
    }


    @TargetDataSource(DataSourceType.arsmanagesupport)
    @Override
    public UserObms findUserObms(Integer id) {
        return userObmsMapper.findUser(id);
    }
}
